package java3_29;

import java.text.SimpleDateFormat;
import java.util.Calendar;


/**
 *0：输出今天的日期和周几，周几用汉字表示(类似，周六，周五，周日)
 */
public class HomeWork0 {
    public static void main(String[] args) {
        Calendar calendar = Calendar.getInstance();
        SimpleDateFormat time1 = new SimpleDateFormat();
        time1.setLenient(false);
        time1.applyPattern("yyy年MM月dd日 ");
        String date = time1.format(calendar.getTime());
        String[] weekDays = {"周日", "周一", "周二", "周三", "周四", "周五", "周六"};
        System.out.println(date + " " + weekDays[calendar.get(Calendar.DAY_OF_WEEK) - 1]);
    }
}
